import request from '@/utils/request'
// 获取列表
export function getDeptApi() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}
// 删除部门
export function delDeptApi(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
// 新增部门
export function addDeptApi(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 根据id查询部门
export function getDeptIdApi(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'GET'
  })
}
// 根据ID更新部门
export function updateDeptIdApi(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
